{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 拿去花开通前后机票CR\n",
    "- 时间段：开通前后各三个月\n",
    "- 分母：有uv的天数\n",
    "- 分子：订单数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import seaborn as sns\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import os"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 数据准备\n",
    "- 读取导出的数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "df = pd.read_csv(r\"b:\\flt_rate.txt\",sep='\\t',\n",
    "                  dtype={\"uid\":str,\"active_date\":str,\"rate_before\":float,\"rate_after\":float})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>uid</th>\n",
       "      <th>active_date</th>\n",
       "      <th>rate_before</th>\n",
       "      <th>rate_after</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>00000168</td>\n",
       "      <td>2016-12-15</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>00000442</td>\n",
       "      <td>2017-09-19</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.800000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>00001449</td>\n",
       "      <td>2017-06-01</td>\n",
       "      <td>0.205128</td>\n",
       "      <td>0.346154</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>00004066</td>\n",
       "      <td>2017-11-05</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>00005695</td>\n",
       "      <td>2017-03-12</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.500000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        uid active_date  rate_before  rate_after\n",
       "0  00000168  2016-12-15     0.000000    0.000000\n",
       "1  00000442  2017-09-19     0.000000    0.800000\n",
       "2  00001449  2017-06-01     0.205128    0.346154\n",
       "3  00004066  2017-11-05     1.000000    0.000000\n",
       "4  00005695  2017-03-12     0.000000    0.500000"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "sns.set_palette('bright', desat=.6)\n",
    "sns.set_context(rc={'figure.figsize': (10, 5) } )"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 数据按BU分开，排除激活时间在最近三个月的数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x68902b0>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAEICAYAAABCnX+uAAAABHNCSVQICAgIfA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lz/iOZ+ZHm138JvL25HPt84IMRMXVcf0Q8\nZtpzLwZe0yzyvoj4W6qpl4NU0y9TN3d7IfDDEfG25uNVVNNBt7WpTWrLIFcJjgBExBVUUygfBT5N\nFY5d047tAd6Tme9uPmc91T3a59J6b4wuqvtM9wCjzVE6zXM9gWp6p9X0d7VdPPx3daRlew9wcWY+\n0DzXmcC9beqSOuLUikqyBfjjzPwE1VzzWVQBOc7D4Xkj8AsR0d+8Z/2ngZ9tc97+iPip5tevBv6h\n+Q7gPyPiVQARsQX46gzPvZHmiLw5zbMN+PIsx13ePO5HgNuBvnY/sNQJg1wleQdwbUR8A/gtqjvP\nnU1117n1EXFtZn4W+CTwT1T/Q/E2qrnuuewHtkXEv1K9WLyxuf3nge3ND1PfAbxihg9N3wacHhF3\nUAX92zPz1hm+x+uBzc1z/TXwC5k58ih+dmlWXrUiSYVzjlwrXkSsBf5xlt1vzczPLGU90kJzRC5J\nhXOOXJIKZ5BLUuEMckkqnEEuSYUzyCWpcAa5JBXu/wHkiJgDg8IFvwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x682be48>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "sns.distplot(df['rate_before'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 显示分布"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0xabdacc0>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAEFCAYAAAD+A2xwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHAFJREFUeJzt3X2UXPV93/H3nYfd1WpnpQWGZ7Axhq+dEmQXOUi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nIJcRCRwCnIR\nkcD9fwMzujHXwSC3AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xabdedd8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.distplot(df['rate_after'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 可以看到开通后的数字要高一些但都有一个长尾，不容易观察，下图是取10的对数的结果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW8AAAEFCAYAAAAsU2YoAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEeVJREFUeJzt3XuQnXV9x/H32UsuSzbJKgdUBrno8HUs492BgpfUgQpW\n1DpWnQpWabUMeGtVFAacloGxtCj1UguCKGJhOhKkaIeGWo1Vi1oQR6jyYwQdWg2wIRuyYZNAku0f\n5yQsmWQvz549x+eb94vZ2XOe85zn+X2TzWd/fJ/LaUxOTiJJqpe+Xg9AkjR3hrck1ZDhLUk1ZHhL\nUg0Z3pJUQwPd2Mno6HjXTmkZGRlibGyiW7vruf2p3v2pVrDezGZba7M53NjXa+lm3gMD/b0eQlft\nT/XuT7WC9WbWiVrThbck7Q8Mb0mqIcNbkmrI8JakGjK8JamGDG9JqiHDW5JqKFd4P/44PPhgr0ch\nSQsuVXivfP3J8LSn0Vi/vtdDkaQFlSq8B2/7EQD9v/7fHo9EkhZWqvDezU8HkpSc4S1JNTSruwpG\nxDHAxaWUVRHxAuAzwA5gG/D2UopHCSWpi2aceUfE2cCVwJL2ok8B7y2lrAJuAD6yYKOTJO3VbGbe\n9wJvBK5pP39rKWXdlPdvnWkDIyNDXb3d48jKIWgOd21/vda01rSsN6/51jpjeJdSVkfE4VOerwOI\niOOA9wCvmGkb3brBenP3/h5l++h4V/bZa83mMKPWmpL15jXbWqcL+EoHL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f9xtpHXjcl5cCvyilXEpr1nxye5t7\n2nMfZwJExHOBnwJD86hLmjXDW3X0ceCaiLgd+DBwG3AErbuzrYyIa0opXwdW0wriu2i1QK6eZpu3\nAH0R8TPgB8Cv2tvc0zeBcyPiTcB7gWPbB0r/GTitlDLegfqkGXm2iSTVkD1v7TciYilw6z5e/lgp\n5aZujkeaD2feklRD9rwlqYYMb0mqIcNbkmrI8JakGjK8JamG/h9v9wvghdsEYAAAAABJRU5ErkJg\ngg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xb0f4a90>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import math\n",
    "df['log_before'] = df['rate_before'].apply(lambda x: math.log10(x) if x != 0 else 0)\n",
    "df['log_after'] = df['log_after'].apply(lambda x: math.log10(x) if x != 0 else 0)\n",
    "ax1=sns.distplot(df['log_before'],color='r')\n",
    "ax2=sns.distplot(df['log_after'],color='g')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
